s = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
for i in s:
    print(i, end=" ")
print()

for i in range(0, len(s)):
    print(s[i], end=" ")
print()

for i in range(len(s)-1, -1, -1):
    print(s[i], end=" ")
print()

for i in s[::-1]:
    print(i, end=" ")
print()